//
//  UIImageView+BOCNetworkImage.h
//  BOCImageTools
//
//  Created by LeungChaos on 16/5/11.
//  Copyright © 2016年 liang. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "BOCHeader.h"


@interface UIImageView (BOCNetworkImage)

/**
 * UIImageView 直接设置网络图片
 *
 *  @param url 图片路径
 */
- (void)setNetworkImageWithURL:(NSURL *)url;

/**
 *  UIImageView 直接设置网络图片 设置占位图片
 *
 *  @param url              图片路径
 *  @param placeholderImage 占位图片
 */
- (void)setNetworkImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholderImage;

/**
 *  UIImageView 直接设置网络图片 设置占位图片 下载完成后回调一个block，以image和error为参数
 *
 *  @param url              图片路径
 *  @param placeholderImage 占位图片
 *  @param completionBlock  下载完成后回调一个block
 */
- (void)setNetworkImageWithURL:(NSURL *)url
              placeholderImage:(UIImage *)placeholderImage
                    completion:(DownloadCompletionBlock)completionBlock;


- (void)setNetworkImageWithURL:(NSURL *)url progress:(BOCProgressHandlerProgressBlock)progressBlock completion:(DownloadCompletionBlock)completionBlock;

@end
